home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 37
/
Aminet 37 (2000)(Schatztruhe)[!][Jun 2000].iso
/
Aminet
/
dev
/
asm
/
Tandem2.68.lha
/
Tandem
/
Teaching
/
27.asm
< prev
next >
Wrap
Assembly Source File
|
2000-04-02
|
1KB
|
33 lines
* 27.asm Use TL routines to open a window version 0.00 1.9.97
include 'Front.i' ;*** Change to 'Tandem.i' to step thru TL's ***
strings: dc.b 0
st_1: dc.b 'My Screen',0 ;1
st_2: dc.b 'My Window',0 ;2
ds.w 0
dpen: dc.l -1 ;default pens structure
* open screen & window; close & exit when close gadget clicked
Program:
TLscreen #2,#st_1,#dpen ;open screen: 2 planes, title st_2, pens dpen
beq Pr_bad ;go if can't
TLwindow #0,#20,#10,#100,#20,#400,#150,#0,#st_2
;open window 0
;posn 20,10 minsize 100,20 maxsize 400,150
;flags: #0=Front.i's default (i.e. HIRES)
;title st_2
beq Pr_bad ;go if can't
Pr_wait:
TLkeyboard ;get IDCMP
cmp.b #$93,d0 ;close window?
bne Pr_wait ;no, keep waiting
rts ;Front.i closes everything
Pr_bad:
move.l xxp_intb(a4),a6
sub.l a0,a0
jsr _LVODisplayBeep(a6) ;if bad, beep existing screens
rts